package com.ryan.day02.demo01;

import java.util.Random;
import java.util.Scanner;

public class DemoRandomScanner {
    public static void main(String[] args) {
        System.out.println("请输入一个随机数：");
        int i = new Scanner(System.in).nextInt();
        int i1 = new Random().nextInt(i);
        System.out.println("生成的数字是：");
        System.out.println(i1+1);
    }
}
